use actix_web::{Responder, web};

use crate::{utils::result, middleware::state::AppState, dao::user::UserDao};

pub async fn list(data: web::Data<AppState>) -> impl Responder {
    let user_dao = UserDao::new(&data.conn);
    result::data(user_dao.select_all().await, "操作成功")
}